home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Utilities / StartupSelector / Install / Install_Startup21 < prev    next >
Encoding:
Text File  |  1997-09-11  |  7.4 KB  |  249 lines

  1. ; $VER: Install_Startup21 0.1 (15.08.97) by OLIVERES 'Moonchild' Jean-Marc
  2.  
  3. ; Définition des variables de texte
  4.  
  5. ; Français
  6.  
  7. (procedure P_français (
  8.     (set MSG_DESTINATION1 (cat "Où désirez-vous installer Startup-Selector 2.1 ?\n"
  9.                                                             "Il est recommandé de sélectionner le répertoire C:\n"
  10.                                                             "Un tiroir \"Sounds\" y sera créé pour les sons."))
  11.     (set MSG_DESTINATION2 "Où désirez-vous installer StartupSelectorPrefs ?\n")
  12.     (set MSG_CATALOG "Quel catalogue désirez-vous installer ?")
  13.     (set MSG_MAKEDIR1 "Création du répertoire \"S:Start\" pour vos scripts.")
  14.     (set MSG_WHEREDOC "Où dois-je mettre la documentation?")
  15.     (set MSG_THANKS "\n\nMerci d'avoir installé %s.")
  16.     (set MSG_SCRIPTREP "Où voulez-vous le répertoire de vos scripts ?")
  17.     (set MSG_ELSEWHERE "Ailleurs")
  18.     (set MSG_EXPLAIN (cat "Maintenant, je vais copier la Startup-Sequence\n"
  19.                                                 "originale dans le répertoire des scripts, puis\n"
  20.                                                 "je vais renommer la Startup-Sequence originale\n"
  21.                                                 "en 'Startup-Sequence.org'. Enfin, je vais créer\n"
  22.                                                 "une startup-sequence réduite."))
  23.     (set MSG_EXPLAIN2 (cat "Il ne vous reste plus qu'à supprimer la commande\n"
  24.                                                  "'Setpatch' de votre Startup-Sequence originale qui\n"
  25.                                                  "se trouve dans votre répertoire de scripts.\n\n"
  26.                                                  "Si 'StartupSelector' n'est pas installé dans votre\n"
  27.                                                  "PATH, alors éditez la nouvelle Startup-Sequence\n"
  28.                                                  "afin de faire correspondre le chemin d'accès."))
  29. ))
  30.  
  31. ; English
  32.  
  33. (procedure P_english (
  34.     (set MSG_DESTINATION1 (cat "Where would you like Startup-Selector 2.1 to be installed ?\n"
  35.                                                             "(It is recommanded to put it in your \"C:\" directory)\n"
  36.                                                             "A drawer \"Sounds\" will be created for the sounds."))
  37.     (set MSG_DESTINATION2 "Where would you like StartupSelectorPrefs to be installed ?\n")
  38.     (set MSG_CATALOG "Wich catalog do you wish to install ?")
  39.     (set MSG_MAKEDIR1 "Making the \"S:Start\" directory for your scripts.")
  40.     (set MSG_WHEREDOC "Where shall I put the documentation?")
  41.     (set MSG_THANKS "\n\nThanks for installing %s.")
  42.     (set MSG_SCRIPTREP "Where shall I create the script's directory ?")
  43.     (set MSG_ELSEWHERE "Elsewhere")
  44.     (set MSG_EXPLAIN (cat "Now I'm going to copy the original\n"
  45.                                                 "Startup-Sequence file in the script's directory.\n"
  46.                                                 "Then I'm going to rename the original\n"
  47.                                                 "Startup-Sequence file to 'Startup-Sequence.org'.\n"
  48.                                                 "Last, I'll create a reduced startup-sequence file."))
  49.     (set MSG_EXPLAIN2 (cat "Now you just have to delete the 'Setpatch command\n"
  50.                                                  "from your original Startup-Sequence wich is in\n"
  51.                                                  "your script's directory.\n\n"
  52.                                                  "If 'StartupSelector' isn't installed in your PATH,\n"
  53.                                                  "then edit the new Startup-Sequence file to have\n"
  54.                                                  "the good path."))
  55. ))
  56.  
  57.  
  58. ; Envoie à la bonne procédure en fonction du langage choisi (icon)
  59.  
  60. (if (= @language "english")  (P_english))
  61. (if (= @language "français") (P_français))
  62.  
  63. ; Définition du répertoire de destination de la doc
  64.  
  65. (set docdir "HELP:")
  66.  
  67. ; Propose un choix dans la destination du programme principal
  68. ; Puis copie le fichier dans la destination
  69. ; Puis copie du répertoire pour les sons au même endroit
  70.  
  71. (set destination
  72.    (askdir
  73.       (prompt MSG_DESTINATION1)
  74.       (help @askdir-help)
  75.       (default "C:")
  76.    )
  77. )
  78.  
  79. (set @default-dest destination)
  80.  
  81. (copyfiles  (help @copyfiles-help)
  82.             (source "/StartupSelector")
  83.             (dest @default-dest)
  84. )
  85.  
  86. (if (= @language "français")
  87.     (copyfiles  (help @copyfiles-help)
  88.                     (source "/")
  89.                             (choices "sounds")
  90.                 (dest @default-dest)
  91.     )
  92.     (copyfiles  (help @copyfiles-help)
  93.                 (source "/")
  94.                             (choices "sounds")
  95.                 (dest @default-dest)
  96.     )
  97. )
  98.  
  99. ; Propose un choix dans la destination du programme de preférences
  100. ; Puis copie le fichier dans la destination
  101.  
  102. (set destination
  103.    (askdir
  104.       (prompt MSG_DESTINATION2)
  105.       (help @askdir-help)
  106.       (default "SYS:Prefs")
  107.    )
  108. )
  109.  
  110. (set prefdir destination)
  111.  
  112. (copyfiles  (help @copyfiles-help)
  113.             (source "/Prefs/StartupSelectorPrefs")
  114.             (dest prefdir)
  115. )
  116.  
  117. (copyfiles  (help @copyfiles-help)
  118.             (source "/Prefs/StartupSelectorPrefs.info")
  119.             (dest prefdir)
  120. )
  121.  
  122. ; Copie du fichier de preférences dans S:
  123.  
  124. (set prefdir "S:")
  125.  
  126. (copyfiles  (help @copyfiles-help)
  127.             (source "/Prefs/StartupSelector.prefs")
  128.             (dest prefdir)
  129. )
  130.  
  131. ; Propose un choix dans la destination de la documentation
  132. ; Puis copie le fichier dans la destination en fonction du langage
  133.  
  134. (set docdir
  135.    (askdir (prompt MSG_WHEREDOC)
  136.            (help @askdir-help)
  137.            (default docdir)
  138.    )
  139. )
  140.  
  141. (if (= @language "français")
  142.     (copyfiles  (help @copyfiles-help)
  143.                 (source "/Docs/Français/StartupSelector.Guide")
  144.                 (dest docdir)
  145.                 (infos)
  146.                 (optional "nofail")
  147.     )
  148.     (copyfiles  (help @copyfiles-help)
  149.                 (source "/Docs/English/StartupSelector.Guide")
  150.                 (dest docdir)
  151.                 (infos)
  152.                 (optional "nofail")
  153.     )
  154. )
  155.  
  156. ; Propose un choix entre S:Start/ et ailleurs pour le répertoire des scripts
  157. ; Puis création du répertoire choisi
  158.  
  159. (set choice
  160.     (askchoice    (prompt MSG_SCRIPTREP)
  161.                             (help @askchoice-help)
  162.                             (choices "S:Start/" MSG_ELSEWHERE)
  163.     )
  164. )
  165.  
  166. (if (= choice 0)
  167.     (set scriptdir "S:")
  168.     (set scriptdir
  169.         (askdir (prompt MSG_SCRIPTREP)
  170.                         (help @askdir-help)
  171.                         (default "SYS:")
  172.        )
  173.     )
  174. )
  175.  
  176. (makedir (tackon scriptdir "Start")
  177. )
  178.  
  179. ; Propose un choix parmis les catalogues
  180. ; Puis copie le catalogue choisi
  181.  
  182. (if (exists "LOCALE:" (noreq))
  183.     (
  184.         (set #catalogs
  185.             (askoptions (prompt MSG_CATALOG)
  186.                         (help @askoptions-help)
  187.                         (choices "français" "italiano" "español")
  188.                         (default #catalogs)
  189.              )
  190.         )
  191.         (if (BITAND #catalogs %001)
  192.             (copyfiles  (help @copyfiles-help)
  193.                         (source "/Catalogs/français/")
  194.                         (dest "LOCALE:Catalogs/français")
  195.                         (all)
  196.                         (optional "nofail")
  197.             )
  198.         )
  199.         (if (BITAND #catalogs %010)
  200.             (copyfiles  (help @copyfiles-help)
  201.                         (source "/Catalogs/italiano/Startupselector.catalog")
  202.                         (dest "LOCALE:Catalogs/italiano")
  203.                         (all)
  204.                         (optional "nofail")
  205.             )
  206.         )
  207.         (if (BITAND #catalogs %001)
  208.             (copyfiles  (help @copyfiles-help)
  209.                         (source "/Catalogs/español/Startupselector.catalog")
  210.                         (dest "LOCALE:Catalogs/español")
  211.                         (all)
  212.                         (optional "nofail")
  213.             )
  214.         )
  215.     
  216.     )
  217. )
  218.  
  219. ; Copie la Startup-Sequence originale dans le répertoire des scripts
  220. ; Renomme la Startup-Sequence originale en 'Startup-Sequence.org'
  221. ; Création d'une startup-sequence réduite
  222. ; Demande de supprimer la ligne 'C:Setpatch' dans celle copiée
  223.  
  224. (message MSG_EXPLAIN
  225. )
  226.  
  227. (set destscript (tackon scriptdir "Start")
  228. )
  229.  
  230. (copyfiles  (help @copyfiles-help)
  231.             (source "SYS:S/Startup-Sequence")
  232.             (dest destscript)
  233. )
  234.  
  235. (rename "SYS:S/Startup-Sequence" "SYS:S/Startup-Sequence.org"
  236. )
  237.  
  238. (copyfiles  (help @copyfiles-help)
  239.             (source "/Install/Startup-Sequence.reduced")
  240.             (dest "SYS:S/")
  241.                         (newname "Startup-Sequence")
  242. )
  243.  
  244. (message MSG_EXPLAIN2
  245. )
  246.  
  247. (exit (MSG_THANKS @app-name)
  248. )
  249.